//
//  LiveZanViewController.m
//  特效动画
//
//  Created by 耐克了解了 on 31/5/17.
//  Copyright © 2017年 耐克了解了. All rights reserved.
//

#import "LiveZanViewController.h"
#import "TWLikeAnimation.h"

@interface LiveZanViewController ()

@end

@implementation LiveZanViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationItem.title = @"直播点赞动画";
    
      [NSTimer scheduledTimerWithTimeInterval:0.25 target:self selector:@selector(showLiveHeartView) userInfo:nil repeats:YES];
}

- (void)showLiveHeartView {
    
    TWLikeAnimation *heart = [[TWLikeAnimation alloc]initWithFrame:CGRectMake(0, 0, 40, 40)];
    [self.view addSubview:heart];
    CGPoint fountainSource = CGPointMake(self.view.frame.size.width - 80, self.view.bounds.size.height - 30 / 2.0 - 10);
    heart.center = fountainSource;
    [heart animatePictureInView:self.view Image:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
